<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>netLink C++ 11: netLink::SocketManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">netLink C++ 11
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>netLink</b></li><li class="navelem"><a class="el" href="classnet_link_1_1_socket_manager.html">SocketManager</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classnet_link_1_1_socket_manager-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">netLink::SocketManager Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Manages a group of Sockets.  
 <a href="classnet_link_1_1_socket_manager.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="net_link_8h_source.html">netLink.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3302a5e748da545267ab80ae90b59e96"><td class="memItemLeft" align="right" valign="top"><a id="a3302a5e748da545267ab80ae90b59e96" name="a3302a5e748da545267ab80ae90b59e96"></a>
std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>newSocket</b> ()</td></tr>
<tr class="memdesc:a3302a5e748da545267ab80ae90b59e96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a new <a class="el" href="classnet_link_1_1_socket.html" title="Socket and stream buffer.">Socket</a>, inserts it into sockets and returns it. <br /></td></tr>
<tr class="separator:a3302a5e748da545267ab80ae90b59e96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc8e305b9267feb5f55f30f405d18af6"><td class="memItemLeft" align="right" valign="top"><a id="adc8e305b9267feb5f55f30f405d18af6" name="adc8e305b9267feb5f55f30f405d18af6"></a>
std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>newMsgPackSocket</b> ()</td></tr>
<tr class="memdesc:adc8e305b9267feb5f55f30f405d18af6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a new <a class="el" href="classnet_link_1_1_msg_pack_socket.html" title="Socket with MsgPack abstraction layer.">MsgPackSocket</a>, inserts it into sockets and returns it. <br /></td></tr>
<tr class="separator:adc8e305b9267feb5f55f30f405d18af6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac34d812026b56162551cce9aedefe22c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnet_link_1_1_socket_manager.html#ac34d812026b56162551cce9aedefe22c">listen</a> (double waitUpToSeconds=0.0)</td></tr>
<tr class="separator:ac34d812026b56162551cce9aedefe22c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a47427d4f7356e251a215d2d961bab5d6"><td class="memItemLeft" align="right" valign="top"><a id="a47427d4f7356e251a215d2d961bab5d6" name="a47427d4f7356e251a215d2d961bab5d6"></a>
std::function&lt; bool(<a class="el" href="classnet_link_1_1_socket_manager.html">SocketManager</a> *manager, std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; serverSocket, std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; clientSocket)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>onConnectRequest</b></td></tr>
<tr class="memdesc:a47427d4f7356e251a215d2d961bab5d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event which is called if a TCP_SERVER accepts a new connection (if false is returned the connection will be closed immediately) <br /></td></tr>
<tr class="separator:a47427d4f7356e251a215d2d961bab5d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d5f02bcb1957cfd4b0404d8bc72b365"><td class="memItemLeft" align="right" valign="top"><a id="a5d5f02bcb1957cfd4b0404d8bc72b365" name="a5d5f02bcb1957cfd4b0404d8bc72b365"></a>
std::function&lt; void(<a class="el" href="classnet_link_1_1_socket_manager.html">SocketManager</a> *manager, std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; socket, <a class="el" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">Socket::Status</a> prev)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>onStatusChange</b></td></tr>
<tr class="memdesc:a5d5f02bcb1957cfd4b0404d8bc72b365"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event which is called if a socket can or can not send more data (also called if nonblocking connect succeeded) <br /></td></tr>
<tr class="separator:a5d5f02bcb1957cfd4b0404d8bc72b365"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45ab601570cf50d5f8ec2b11d99bbe37"><td class="memItemLeft" align="right" valign="top"><a id="a45ab601570cf50d5f8ec2b11d99bbe37" name="a45ab601570cf50d5f8ec2b11d99bbe37"></a>
std::function&lt; void(<a class="el" href="classnet_link_1_1_socket_manager.html">SocketManager</a> *manager, std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; socket)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>onReceiveRaw</b></td></tr>
<tr class="memdesc:a45ab601570cf50d5f8ec2b11d99bbe37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event which is called if a socket receives new raw data. <br /></td></tr>
<tr class="separator:a45ab601570cf50d5f8ec2b11d99bbe37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08cc13db51c726ecd79137ebe6271361"><td class="memItemLeft" align="right" valign="top"><a id="a08cc13db51c726ecd79137ebe6271361" name="a08cc13db51c726ecd79137ebe6271361"></a>
std::function&lt; void(<a class="el" href="classnet_link_1_1_socket_manager.html">SocketManager</a> *manager, std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; socket, std::unique_ptr&lt; <a class="el" href="class_msg_pack_1_1_element.html">MsgPack::Element</a> &gt; element)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>onReceiveMsgPack</b></td></tr>
<tr class="memdesc:a08cc13db51c726ecd79137ebe6271361"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event which is called if a socket receives a <a class="el" href="class_msg_pack_1_1_element.html" title="Abstract class to represent one element in a MsgPack stream.">MsgPack::Element</a>. <br /></td></tr>
<tr class="separator:a08cc13db51c726ecd79137ebe6271361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b80317fe10e46c787a2c24e2cef3a37"><td class="memItemLeft" align="right" valign="top"><a id="a9b80317fe10e46c787a2c24e2cef3a37" name="a9b80317fe10e46c787a2c24e2cef3a37"></a>
std::set&lt; std::shared_ptr&lt; <a class="el" href="classnet_link_1_1_socket.html">Socket</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>sockets</b></td></tr>
<tr class="memdesc:a9b80317fe10e46c787a2c24e2cef3a37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sockets which are managed. <br /></td></tr>
<tr class="separator:a9b80317fe10e46c787a2c24e2cef3a37"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages a group of Sockets. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ac34d812026b56162551cce9aedefe22c" name="ac34d812026b56162551cce9aedefe22c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac34d812026b56162551cce9aedefe22c">&#9670;&#160;</a></span>listen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void netLink::SocketManager::listen </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>waitUpToSeconds</em> = <code>0.0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Listens a periode time </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">waitUpToSeconds</td><td>Maximum time to wait for incoming data in seconds or negative values to wait indefinitely </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="net_link_8h_source.html">netLink.h</a></li>
<li>src/SocketManager.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
